package com.qk.common.utils;

/*
 *  @author SHCJ
 *  @created 2025/10/14 21:27
 *  @description
 */
public class CurrentUserContextHolders {
    private static final ThreadLocal<Integer> USER_CONTEXT = new ThreadLocal<>();

//    构造器私有化
    private CurrentUserContextHolders(){}

    public static void set(Integer userId){
        USER_CONTEXT.set(userId);
    }
    public static Integer get(){
        return USER_CONTEXT.get();
    }
    public static void remove(){
        USER_CONTEXT.remove();
    }
}
